package request

import "github.com/shopspring/decimal"

type AddProductRequest struct {
	Name        string                     `json:"name" validate:"required,min=3,max=255"`
	GoodsSN     string                     `json:"goods_sn,omitempty"`
	CategoryID  int64                      `json:"category_id" validate:"required"`
	Description string                     `json:"description" validate:"required,min=3"`
	MainImage   string                     `json:"main_image,omitempty"`
	Skus        []AddProductRequestSkuInfo `json:"skus"`
}

type AddProductRequestSkuInfo struct {
	SkuSN       string            `json:"sku_sn,omitempty"`
	ShopPrice   decimal.Decimal   `json:"shop_price" validate:"required,gt=0"`
	MarketPrice decimal.Decimal   `json:"market_price" validate:"required,gt=0"`
	Attributes  map[string]string `json:"attributes"`
}
